package com.example.design.model;

/**
 * 茶
 *  *  1.把水煮沸
 *  *  2.用沸水冲泡茶
 *  *  3.把茶倒进杯子
 *  *  4.加柠檬
 */
public class TeaWithHook extends CaffeineBeverageWithHook {
    /** 是否启用钩子方法 */
    private boolean checkCondiments;

    public TeaWithHook(){
        this.checkCondiments = false;
    }
    public TeaWithHook(boolean checkCondiments){
        this.checkCondiments = checkCondiments;
    }

    @Override
    void brew() {
        System.out.println("用沸水冲泡茶");
    }

    @Override
    void addCondiments() {
        System.out.println("加柠檬");
    }

    public boolean customerWantsCondiments(){
         return checkCondiments;
    }

    public boolean isCheckCondiments() {
        return checkCondiments;
    }

    public void setCheckCondiments(boolean checkCondiments) {
        this.checkCondiments = checkCondiments;
    }
}
